<style type="text/css">
    body,#container{
    height: 814px;
    margin: 0px;
    font: 12px Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '微软雅黑', Arial;
  }
  .info-title{
    color: white;
    font-size: 14px;
    background-color: rgba(0,155,255,0.8);
    line-height: 26px;
    padding: 0px 0 0 6px;
    font-weight: lighter;
    letter-spacing: 1px;
  }
  .info-content{
    padding: 4px;
    color: #666666;
    line-height: 23px;
  }
  .info-content img{
    float: left;
    margin: 3px;
  }
</style>
<div id="container" tabindex="0"></div>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=da5c9bd9f70038433326fe62a56b2cc5"></script>
<script type="text/javascript">
    var map = new AMap.Map('container',{
            resizeEnable: true,
            zoom: 10,
            center: [104.480983, 30.6000]
    });
    var marker = new AMap.Marker({
            position: [116.480983, 39.989628]
    });
    marker.setMap(map);
    marker.on('click',function(e){
      infowindow.open(map,e.target.getPosition());
    })
    // AMap.plugin('AMap.AdvancedInfoWindow',function(){
    //    infowindow = new AMap.AdvancedInfoWindow({
    //     content: '<div class="info-title">高德地图</div><div class="info-content">'+
    //             '<img src="http://webapi.amap.com/images/amap.jpg">'+
    //             '高德是中国领先的数字地图内容、导航和位置服务解决方案提供商。<br/>'+
    //             '<a target="_blank" href = "http://mobile.amap.com/">点击下载高德地图</a></div>',
    //     offset: new AMap.Pixel(0, -30)
    //   });
    //   infowindow.open(map,[116.480983, 39.989628]);
    // })
    AMap.plugin(['AMap.ToolBar','AMap.Scale'],function(){
        
        var toolBar = new AMap.ToolBar({
            offset: new AMap.Pixel(1550, 500),
            direction: false    
        });
        var scale = new AMap.Scale();
        map.addControl(toolBar);
        map.addControl(scale);
    });
</script>

